projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
198c5f9
)
usb:composite: clear the whole common buffer
author
Jeroen Hofstee
<
[email protected]
>
Mon, 9 Jun 2014 13:28:59 +0000
(15:28 +0200)
committer
Marek Vasut
<
[email protected]
>
Wed, 25 Jun 2014 20:42:07 +0000
(22:42 +0200)
Since the struct fsg_common is calloced, reset it completely
with zero's when reused. While at it, make checkpatch happy.
cc: Lukasz Majewski <
[email protected]
>
cc: Piotr Wilczek <
[email protected]
>
cc: Kyungmin Park <
[email protected]
>
cc: Marek Vasut <
[email protected]
>
Signed-off-by: Jeroen Hofstee <
[email protected]
>
Acked-by: Marek Vasut <
[email protected]
>
Acked-by: Lukasz Majewski <
[email protected]
>
drivers/usb/gadget/f_mass_storage.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_mass_storage.c
b/drivers/usb/gadget/f_mass_storage.c
index 6374bb953a94478bbf469b09b52756e18796fac4..f274d9679fb95747988accf9b75e8d0c110270c9 100644
(file)
--- a/
drivers/usb/gadget/f_mass_storage.c
+++ b/
drivers/usb/gadget/f_mass_storage.c
@@
-2462,12
+2462,12
@@
static struct fsg_common *fsg_common_init(struct fsg_common *common,
/* Allocate? */
if (!common) {
- common = calloc(sizeof
*common
, 1);
+ common = calloc(sizeof
(*common)
, 1);
if (!common)
return ERR_PTR(-ENOMEM);
common->free_storage_on_release = 1;
} else {
- memset(common, 0, sizeof
common
);
+ memset(common, 0, sizeof
(*common)
);
common->free_storage_on_release = 0;
}